<?php

$loader = new \Phalcon\Loader();

/**
 * We're a registering a set of directories taken from the configuration file
 */

$loader->registerNamespaces(array(
    'Library' => __DIR__ . '/../source/library/',
    'Library\Acl' => __DIR__ . '/../source/library/Acl/',
    'Library\Auth' => __DIR__ . '/../source/library/Auth/',
    'Library\Controllers' => __DIR__ . '/../source/library/Controllers/',
    'Library\Pagination' => __DIR__ . '/../source/library/Pagination/',
    'Library\Upload' => __DIR__ . '/../source/library/Upload/'
    //'Common\Models' => __DIR__ . '/../source/common/common/models/' ,
    //'Common\Models\Users' => __DIR__ . '/../source/common/models/users/',
));

// Register some classes
$loader->registerClasses(
    array(
        "FrontendController"         => __DIR__ . '/../source/common/controllers/FrontendController.php',         
        "BackendController"         => __DIR__ . '/../source/common/controllers/BackendController.php',       
    )
);

$loader->registerDirs(
    array(
       	__DIR__ . '/../source/library/',
));

$loader->register();

// Use composer autoloader to load vendor classes
require_once __DIR__ . '/../../vendor/autoload.php';